//
//  QLMPersonViewController.m
//  Xiaomakuaixiu
//
//  Created by 邬俊涛 on 2018/3/9.
//  Copyright © 2018年 hwd. All rights reserved.
//

#import "QLMPersonViewController.h"
#import "QLMPersonTabCell.h"

@interface QLMPersonViewController ()<UITableViewDelegate,UITableViewDataSource>

@end

@implementation QLMPersonViewController

- (void)viewDidLoad {
    [super viewDidLoad];
    // Do any additional setup after loading the view.
//    self.view.backgroundColor=[UIColor lightGrayColor];
    
    CGRect tabFrame = CGRectMake(0, 1, kScreen_width, kScreen_height-41-44-QLM_StatusBarAndNavigationBarHeight-IOS11_OR_LATER_SPACE(34));
    
    UITableView *_invoicetableview=[[UITableView alloc] initWithFrame:tabFrame style:UITableViewStylePlain];
    _invoicetableview.backgroundColor=[UIColor clearColor];
    _invoicetableview.delegate=self;
    _invoicetableview.dataSource=self;
    _invoicetableview.separatorStyle=UITableViewCellSeparatorStyleSingleLine;
    _invoicetableview.showsVerticalScrollIndicator=NO;
    _invoicetableview.showsHorizontalScrollIndicator=NO;
    _invoicetableview.tableFooterView=[UIView new];
    _invoicetableview.tableHeaderView=[UIView new];
    [self.view addSubview:_invoicetableview];
    
    if (@available(iOS 11.0, *)) {
        _invoicetableview.contentInsetAdjustmentBehavior=UIScrollViewContentInsetAdjustmentNever;
    } else {
        // Fallback on earlier versions
        self.automaticallyAdjustsScrollViewInsets = NO;
    }
}

- (void)didReceiveMemoryWarning {
    [super didReceiveMemoryWarning];
    // Dispose of any resources that can be recreated.
}

- (CGFloat)tableView:(UITableView *)tableView heightForRowAtIndexPath:(NSIndexPath *)indexPath{
    return 80;
}

- (NSInteger)tableView:(UITableView *)tableView numberOfRowsInSection:(NSInteger)section{
    return 10;
}

- (UITableViewCell *)tableView:(UITableView *)tableView cellForRowAtIndexPath:(NSIndexPath *)indexPath{
    QLMPersonTabCell *personCell=[QLMPersonTabCell cellWithTableView:tableView];
    personCell.selectionStyle=UITableViewCellSelectionStyleNone;
    return personCell;
}

- (void)tableView:(UITableView *)tableView didSelectRowAtIndexPath:(NSIndexPath *)indexPath{
    [tableView deselectRowAtIndexPath:indexPath animated:YES];
}
/*
#pragma mark - Navigation

// In a storyboard-based application, you will often want to do a little preparation before navigation
- (void)prepareForSegue:(UIStoryboardSegue *)segue sender:(id)sender {
    // Get the new view controller using [segue destinationViewController].
    // Pass the selected object to the new view controller.
}
*/

@end
